A position detector that detects a rotation angle of a rotating object (detection object) has been known. In the known position detector, a magnetic field generation element, such as a magnet, or a magnetic field detection element, such as a Hall element, is disposed on the detection object. The magnetic field detection element detects a change in magnetic flux density when the detection object rotates, and the rotation angle of the detection object is calculated based on the change in the magnetic flux density detected.
For example, in a position detector of JP 3491577 B2, which corresponds to U.S. Pat. No. 6,498,479 B1, a magnet is disposed on a shaft as the detection object, and a rotation angle θ degree (°) of the shaft is detected based on the following formula 1:θ=sin−1(VH/V0)  (Formula 1)
In the formula 1, VH is an output voltage (V) of the Hall element, and V0 is a maximum voltage (V), that is, a maximum value of the output voltage of the Hall element.
In the position detector of JP 3491577 B2, however, the maximum voltage V0 of the formula 1 is a fixed value. Therefore, when the density of the magnetic flux generated by the magnet changes due to an ambient temperature where the position detector is used, detection accuracy of the rotation angle calculated by the formula 1 is likely to reduce. Further, when the density of the magnetic flux increases with the change of the temperature, the output voltage VH will be greater than the maximum voltage V0. In such a case, an inverse sine function of the expression 1 will not be calculated.